﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Timers;
using WorldEvolution;

namespace TestWorld
{
    class Program
    {
        static void Main(string[] args)
        {
            App.Instance.Initialze();

            Timer time = new Timer();
            time.Interval = Time.FrameDeltaTime;
            time.Elapsed += Time_Elapsed;
            time.Start();

            History.Instance.OnHistoryAdd = Program.OutputHistory;

            while (true)
            {
                System.Threading.Thread.Sleep(0);
            }
        }

        static void OutputHistory(string s)
        {
            Console.WriteLine(s);
        }

        private static void Time_Elapsed(object sender, ElapsedEventArgs e)
        {
            App.Instance.Tick();
        }
    }
}
